package com.able.wanandroid.http;

import com.able.wanandroid.bean.ArticleBean;
import com.able.wanandroid.bean.BannerBean;
import com.able.wanandroid.bean.BaseResult;
import com.able.wanandroid.bean.HotKeyBean;
import com.able.wanandroid.bean.TreeBean;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * 网络接口定义
 *
 * @author Able
 * @date 2018/2/11
 */
public interface RetrofitApi {

    @GET("article/list/0/json")
    Call<ArticleBean> queryArticle();

    @GET("article/list/{pageNo}/json")
    Call<ArticleBean> loadMoreArticle(@Path("pageNo") int pageNo);

    @GET("banner/json")
    Call<BannerBean> getBanner();

    @GET("hotkey/json")
    Call<BaseResult<List<HotKeyBean>>> getHotKey();

    @GET("tree/json")
    Call<BaseResult<List<TreeBean>>> getTreeData();

    @GET("article/list/{pageNo}/json")
    Call<ArticleBean> getArticleTree(@Path("pageNo") int pageNo, @Query("cid") int cid);

}
